package com.hao.editorview.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by hao on 16/10/19.
 */
public class EmojiViewPageAdapter extends FragmentPagerAdapter {
    public EmojiViewPageAdapter(FragmentManager fm) {
        super(fm);
    }

    //传值方法
    List<Fragment> list;

    public void setData(List<Fragment> list) {
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}